home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 627 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  2.7 KB

  1. Path: redstone.interpath.net!usenet
  2. From: fortunat@interpath.com (Jumpstile Turner)
  3. Newsgroups: comp.graphics.algorithms,comp.lang.c++,comp.os.ms-windows.programmer.graphics,comp.os.ms-windows.programmer.multimedia,comp.os.ms-windows.programmer.win32
  4. Subject: Re: IJG JPEG Engine and Win32
  5. Date: 5 Jan 1996 12:26:05 GMT
  6. Organization: Completely unorganized
  7. Message-ID: <4cj5ct$nth@redstone.interpath.net>
  8. References: <4cemir$6vb@redstone.interpath.net> <TGL.96Jan3202549@netcom21.netcom.com>
  9. NNTP-Posting-Host: fortunat.pdial.interpath.net
  10. X-Newsreader: WinVN 0.99.7
  11.  
  12. In article <TGL.96Jan3202549@netcom21.netcom.com>, tgl@netcom.com said:
  13. >  * Compiling them with different declarations for "boolean".  The IJG
  14. >    code by default defines boolean = int, but Windows prefers
  15. >    boolean = unsigned char.  Theoretically you should get a compile
  16. >    error if both typedefs are visible in one compilation, but maybe
  17. >    Borland fails to complain about it.
  18. >
  19. >If neither of those explain your problem, you'll have to do some more
  20. >digging, but I'll bet lunch that the problem is of this general ilk.
  21.  
  22.   Well I think this is my problem.  I don't know how to go about fixing it 
  23. though.  Being as my application is a GUI application I NEED to include the 
  24. windows.h file, so "BOOLEAN" will be defined as an unsigned char, however 
  25. "boolean" is defined in one of the jpeglib includes as int.  If I went through 
  26. all the source and changed "boolean" to "BOOLEAN" would this screw up jpeglib? 
  27. Being as the source uses 0 for FALSE and 1 for TRUE I don't see why this 
  28. shouldn't work.  I'll have to give it a go.
  29.  
  30.   Incidently as of right now I converted all the stdlib functions into Windows 
  31. API functions (i.e. CreateFile instead of fopen, ReadFile instead of the 
  32. JFREAD macro, HeapAlloc instead of malloc) and everything appears to work 
  33. until I try to allocate a buffer with the jpeglib's memory allocation 
  34. functions.  Then I get an invalid page fault.  This is with using the decoding 
  35. routine from example.c.  I haven't been able to figure out the cause of this 
  36. one.  It will do this even if I use malloc instead of HeapAlloc.  Time for 
  37. more experimentation.
  38.  
  39.   Oh yes, and lastly, with the borland BCC32 command line compiler, jdmerge.c 
  40. will not compile.  I get an internal backend C1107 error at line 280.  This 
  41. seems like a bug in the borland compiler. It will compile fine if I use 
  42. BCC32A, the alternate compiler. I have to undefine UPSAMPLE_MERGING_SUPPORTED 
  43. so it will skip the contents of jdmerge.c to get it to compile with the 
  44. standard WIN32 compiler.
  45.  
  46.                 -Scott
  47.  
  48. ------------------------------------------------
  49. Jumpstile Turner
  50. fortunat@interpath.com
  51. "Sing the Hare Hare, Dance the Hoochie Koo..."
  52. ------------------------------------------------
  53.  
  54.